// 将搜索记录导入localStorage、导出localStorage

// 从localStorage中导出所有搜索记录
export const loadSearchs = (): string[] => {
  return localStorage.searchs ? JSON.parse(localStorage.searchs) : [];
};

// 把搜索记录保存到localStorage
export const saveSearchs = (searchs: string[]) => {
  localStorage.searchs = JSON.stringify(searchs);
};
